<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    <h1>scope.jsp页面</h1>
    <%
        pageContext.setAttribute("key","pageContext");
        request.setAttribute("key","request");
        session.setAttribute("key","session");
        application.setAttribute("key","application");
    %>

    pageContext是否有值：<%=pageContext.getAttribute("key")%> <br>
    request是否有值：<%=request.getAttribute("key")%> <br>
    session是否有值：<%=session.getAttribute("key")%> <br>
    application是否有值：<%=application.getAttribute("key")%> <br>

    <%
//        request.getRequestDispatcher("/scope2.jsp").forward(request,response);
    %>

    <%--
       <jsp:forward page=""></jsp:forward> 是请求转发标签，它的功能是请求转发
       page属性设置请求转发的路径
     --%>
    <jsp:forward page="/scope2.jsp"></jsp:forward>
</body>
</html>
